package main

import "fmt"

func main()  {
	fmt.Printf("Calling test\r\n")
	test()
	fmt.Printf("Test compleed\r\n")
}

func test()  {
	defer func() {
		if e:=recover();e!=nil {
			fmt.Printf("Panicing %s%s%s\r\n",e,"|","but you can recover the func here.")
		}
	}()
	badCall()
	fmt.Printf("After bad call\r\n")
}

func badCall()  {
	a,b:=10,0
	n:=a/b
	fmt.Println(n)
}
